﻿namespace IOA.MES.DataAccess.VModel
{
    /// <summary>
    /// 不良原因配置
    /// </summary>
    public class VBadReason : BaseVModel
    {
        private string _badTypeCode = string.Empty;
        private string _reasonCode = string.Empty;
        private string _reasonVN = string.Empty;
        private string _reasonEN = string.Empty;
        private string _reasonCN = string.Empty;

        #region Public Property

        ///<Summary>
        /// 异常站点
        ///</Summary>
        public Enum.JudgeType? ReasonType { get; set; }

        ///<Summary>
        /// 类型代码
        ///</Summary>
        public string BadTypeCode
        {
            get { return string.IsNullOrWhiteSpace(_badTypeCode) ? string.Empty : _badTypeCode; }
            set { _badTypeCode = value; }
        }

        /// <summary>
        /// 终检按钮序号
        /// </summary>
        public int? KeyIndex { get; set; }

        ///<Summary>
        /// 原因代码
        ///</Summary>
        public string ReasonCode
        {
            get { return string.IsNullOrWhiteSpace(_reasonCode) ? string.Empty : _reasonCode; }
            set { _reasonCode = value; }
        }

        ///<Summary>
        /// 原因（越文）
        ///</Summary>
        public string ReasonVN
        {
            get { return string.IsNullOrWhiteSpace(_reasonVN) ? string.Empty : _reasonVN; }
            set { _reasonVN = value; }
        }

        ///<Summary>
        /// 原因（英文）
        ///</Summary>
        public string ReasonEN
        {
            get { return string.IsNullOrWhiteSpace(_reasonEN) ? string.Empty : _reasonEN; }
            set { _reasonEN = value; }
        }

        ///<Summary>
        /// 原因（中文）
        ///</Summary>
        public string ReasonCN
        {
            get { return string.IsNullOrWhiteSpace(_reasonCN) ? string.Empty : _reasonCN; }
            set { _reasonCN = value; }
        }

        /// <summary>
        /// 是否来料不良
        /// </summary>
        public bool IsMaterielBad { get; set; }
        #endregion

        private string _badTypeName = string.Empty;

        ///<Summary>
        /// 类型名称
        ///</Summary>
        public string BadTypeName
        {
            get { return string.IsNullOrWhiteSpace(_badTypeName) ? string.Empty : _badTypeName; }
            set { _badTypeName = value; }
        }
    }
}
